package com.learn.log;

import java.rmi.AccessException;
import java.rmi.ServerException;
import java.sql.SQLException;

/**
 * Created by chenxin on 2017/8/12.
 */
public class MainTest {
    public static void main(String[] args) {
        A();
    }

    public static void A(){
        try {
            B("abc");
        } catch (ServerException e) {
            System.out.println("call B error " + e);
        }
    }

    public static void B(String args) throws ServerException {
        try {
            method();
        } catch (AccessException e) {
            System.out.println("call method error, args=" + args + " " + e);
            throw new ServerException("*****info***", e);
        }
    }

    public static void method() throws AccessException {
        throw new AccessException("args invalidate error");
    }
}
